home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / Mac⁄gnuucp 6.14 / source / uucp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-22  |  4.0 KB  |  111 lines  |  [TEXT/KAHL]

  1. /*
  2.  * @(#)uucp.h 1.9 87/09/29    Copyright 1987 Free Software Foundation, Inc.
  3.  *
  4.  * Copying and use of this program are controlled by the terms of the
  5.  * GNU Emacs General Public License.
  6.  *
  7.  * Header file for gnuucp.
  8.  *
  9.  * Pieces that look like they might be taken from Unix uucp are
  10.  * cribbed with the aid of public domain uucp modules (like the F-protocol)
  11.  * that use that interface.
  12.  */
  13.  
  14. #ifndef FALSE
  15. #define FALSE 0
  16. #endif
  17.  
  18. #ifndef TRUE
  19. #define TRUE 1
  20. #endif
  21.  
  22. #define Ifn    FOO    /* file descriptor of the "phone line" */
  23.  
  24. #define    ASSERT(cond, msg, moremsg, huh) /**/
  25. #define    prefix(s, l)    \
  26.         (strncmp(s, l, strlen(s)) == SAME)
  27.  
  28. #define    DEBUG(level, msg, moremsg) \
  29.     {if ((long)debug >= (long)level) printf(msg, moremsg);}
  30. #define    DEBUG_LEVEL(level) \
  31.        ((long)debug >= (long)level)
  32.  
  33. /* I may have these flipped from what Unix uses... */
  34. /* BUT: my code depends on these values in if (foo()) statements, sigh */
  35. #define    SUCCESS    0
  36. #define    FAIL    1
  37.  
  38. /* #define    MAXMSGLEN    ((NAMESIZE*4)+SLOP) */    /* ?>?? FIXME */
  39. #define    MAXMSGLEN    (4096+SLOP)    /* ?>?? FIXME */
  40. #define    MAXMSGTIME    60    /* Timeout period for rdmsg */
  41. #define    MAX_HOST    20    /* Host name length (uucp does 7) */
  42. #define    MAXBASENAME    7    /* Host name length in queue file names */
  43. #define    SYSNSIZE    MAXBASENAME    /* uuq uses */
  44. #define    CMDPRE        'C'        /* Prefix on command files */
  45. #define    X_LOCK        "XQT"    /* Lock name for uuxqt runs */
  46. #define    MAX_LSYS    500    /* Max length of an L.sys line in chars */
  47. #define    MAX_CTLLINE    100    /* Max length of a usenet.ctl line */
  48.  
  49. #define    CTL_DELIM    " \t\n\r"    /* Delimiters for usenet.ctl */
  50. #define FILE_DELIM "\t\n\r" /* Don't use up space when we parse a filename */
  51.  
  52. extern int debug;            /* Debugging level */
  53.  
  54. /*
  55.  * Timeout for raw characters -- if we don't hear a char within BYTE_TIMEOUT
  56.  * seconds, we assume the other side has gone away.  Has nothing to do with
  57.  * retransmission timeouts (if any!).
  58.  */
  59. #define    BYTE_TIMEOUT    15    /* seconds */
  60. #define CONNECT_WAIT 15
  61. #define    ONEDAY        (24*60*60)    /* seconds */
  62.  
  63. /* Misc stuff */
  64. #define    SAME        0        /* if (strcmp(a,b) == SAME) ... */
  65. #define    SLOP        10        /* Slop space on arrays */
  66.  
  67. /* STST system status file codes */
  68. #define    SS_WRONGTIME    99        /* Wrong time to call -- not used */
  69. #define    SS_INPROGRESS    3        /* Talking */
  70. #define SS_FAIL        4        /* Dial failed */
  71. #define    MAXRECALLS    20        /* Max # of recalls if STST there */
  72.  
  73. /*
  74.  * Definition of serial ports that we can call out on.
  75.  */
  76. #define    PORTNAME_SIZE    20        /* Arbitrary */
  77. struct port {
  78.     char    portname[PORTNAME_SIZE]; /* Name of port type, e.g. ACU */
  79.     char    modemname[PORTNAME_SIZE]; /* Name of dialer type, e.g. hayes */
  80.     char    devname [PORTNAME_SIZE]; /* Name of device, e.g. cua0, com1 */
  81.     long    baud;            /* A baud rate that works */
  82.     struct port *chain;        /* Chain to next entry */
  83. };
  84.  
  85. /* Variables that uucp uses for various things */
  86. extern char    Progname[NAMESIZE];            /* Our program name e.g. "uuq" */
  87. extern char    *Spool;            /* Our spool directory */
  88. extern char *Alias;            /* Directory for aliases */
  89. extern char    *uuControl;        /* Our control file */
  90. extern char    Myname[MAX_HOST];    /* Our host name */
  91. extern char    Mynamealias[MAX_HOST];    /* Our host name */
  92. extern char    host_name[MAX_HOST];    /* Other guy's host name */
  93. extern char Forwarder[MAX_HOST]; /*Default forwarder for mail not on this host */
  94. extern int    ourpid;            /* Our process ID */
  95. extern char    *Sysfile;        /* L.sys file */
  96. extern char    *Userfile;        /* USERFILE */
  97. extern char *Mail;            /* Our mail directory */
  98. extern char *Loginfile;        /* File to log logins to our machine */
  99. extern char    *Pubdir;        /* Public Directory */
  100. extern char *UUCPlogname;   /* Login name for remote UUCP's */
  101. extern char *UUCPpasswd;    /* password for remote UUCP's */
  102. extern struct port *ports;        /* List of serial ports */
  103. extern char    who[NAMESIZE];        /* User who sent/requested a file */
  104. extern int    logfd;            /* File descriptor of log file */
  105. extern long ByteTimeout;    /* Max time (in Secs that xgetc waits for a char */
  106. extern long ConnectWait;
  107. extern long PacketSize;
  108. extern char *Timezone;
  109. extern Boolean AppendLogfile;
  110. extern char *DialPrefix;
  111. extern char *DialPostfix;